﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Day02NightInterface
{
    class Program
    {
        static void Main3(string[] args)
        {
            GraphManage manager = new GraphManage() {
                Graphs = new List<Graph>() {
                    new Graph(){
                        CalculateObj = new Circle(){ Radius = 1}
                        },
                    new Graph(){
                        CalculateObj = new Triangle(){ SideLength1 = 3, SideLength2 = 4, SideLength3 = 5}
                        },
                    new Graph(){
                        CalculateObj = new Rectangle(){ Length = 1, Width = 1}
                        }

                }
            };
            float totalArea = manager.GetTotalArea();
            float totalPerimeter = manager.GetTotalPerimeter();
            Console.WriteLine("总面积：{0}",totalArea);
            Console.WriteLine("总周长：{0}",totalPerimeter);
        }
    }
}
